/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React, { useState } from "react";
import PageHeaderLayout from "@/layouts/PageHeaderLayout";
import StandardTab from "@/components/StandardTab";
import styles from "../commen.less";
import OrderRecord from "../components/OrderRecord";
import OrderStatistics from "../components/OrderStatistics";

const Index = () => {
  const [activeKey, setActiveKey] = useState("record");
  const sourceType = "derivative";
  const onChange = activeKey => {
    setActiveKey(activeKey);
  };
  const panes = [
    {
      tab: "单号记录",
      key: "record",
      component: <OrderRecord sourceType={sourceType} activeKey={activeKey} />,
    },
    {
      tab: "单号使用统计",
      key: "statistics",
      component: <OrderStatistics sourceType={sourceType} activeKey={activeKey} />,
    },
  ];
  return (
    <PageHeaderLayout title="单号记录">
      <div className={styles.main}>
        <StandardTab onChange={onChange} activeKey={activeKey} panes={panes} name="record" />
      </div>
    </PageHeaderLayout>
  );
};

export default Index;
